﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Collections.Specialized;

namespace SponsorshipManager.Domain
{




    public abstract class Person : DomainObject
    {
  
        #region Enums
        /// <summary>eoins.  
        ///     Unknown is logically equal to null.
        /// </summary>
        public enum GenderEnum
        {
            Male,
            Female
        }
        #endregion

        List<Note> _notes;


        #region Public Properties

        /// <summary>
        /// Gets or sets the person's date of birth
        /// <value>The person's date of birth</value>
        /// </summary>
        public DateTime DateOfBirth { get; set; }

        /// <summary>
        /// Gets or sets the person's forename
        /// <value>The person's forename</value>
        /// </summary>
        public string Forename { get; set; }

        public List<Address> Addresses = new List<Address>();



        /// <summary>
        /// Gets or sets the person's surname
        /// <value>The person's surname</value>
        /// </summary>
        public string Surname { get; set; }

        /// <summary>
        /// Gets or sets the person's gender
        /// <value>The person's gender : SponsorshipManager.Domain.Person.GenderEnum</value>
        /// </summary>
        public GenderEnum? Gender { get; set; }

        /// <summary>
        /// Gets of sets the person's email.
        /// </summary>
        public string Email { get; set; }
        
        // public User UserAccount { get; set; }
        public List<Note> Notes
        {
            get
            {
                if (_notes == null)
                {
                    _notes = new List<Note>();
                }
                return _notes;
            }
            set
            {
                _notes = value;
            }
        }

        #endregion

        #region Public Methods

        /// <summary>
        /// Adds a note.
        /// </summary>
        /// <param name="note">The note.</param>
        public void AddNote(Note note)
        {
            Notes.Add(note);
        }
    #endregion

    }
}
